// const util = require('../../utils/util.js');
// const api = require('../../config/api.js');
// const user = require('../../utils/user.js');

//获取应用实例
const app = getApp()
Page({
  data: {
    movies: [
      { url: '../img/demo1Cart.png' },
      { url: '../img/demo3.jpg' },
      { url: '../img/home2.jpg' }
    ],
    newGoods: [],
    hotGoods: [
      {
        listPicUrl:"../img/张宇.jpg",
        name:"张宇36讲全套，几乎未动，楼主买完保研了",
        retailPrice:"35"
      },
      {
        listPicUrl: "../img/张宇.jpg",
        name: "张宇36讲全套，几乎未动，楼主买完保研了",
        retailPrice: "35"
      }
    ],
    topics: [],
    brands: [],
    floorGoods: [],
    banner: [],
    channel: [
      { iconUrl: "../img/书.png", name:"书籍"},
      { iconUrl: "../img/化妆.png", name: "美妆" },
      { iconUrl: "../img/文具.png", name: "文具" },
      { iconUrl: "../img/年级.png", name: "年级" },
      { iconUrl: "../img/学院.png", name: "学院" }
    ]
  },
  // // onShareAppMessage: function () {
  // //   return {
  // //     title: 'litemall小商场',
  // //     desc: '仿网易严选微信小程序商城',
  // //     path: '/pages/index/index'
  // //   }
  // // },

  // getIndexData: function () {
  //   let that = this;
  //   util.request(api.IndexUrl).then(function (res) {
  //     if (res.errno === 0) {
  //       that.setData({
  //         newGoods: res.data.newGoodsList,
  //         hotGoods: res.data.hotGoodsList,
  //         topics: res.data.topicList,
  //         brands: res.data.brandList,
  //         floorGoods: res.data.floorGoodsList,
  //         banner: res.data.banner,
  //         channel: res.data.channel
  //       });
  //     }
  //   });
  // },
  onLoad: function (options) {
    // this.getIndexData();
  },
  onReady: function () {
    // 页面渲染完成
  },
  onShow: function () {
    // 页面显示
  },
  onHide: function () {
    // 页面隐藏
  },
  onUnload: function () {
    // 页面关闭
  },
})
